#!/usr/bin/perl -w
#
# Task A (2 points)
# Write a program that asks the user for two DNA sequences and 
# stores them in two variables. Create references to the variables 
# and use dereferencing to retrieve the sequence and concatenate them. 
# As output, print the result of the concatenation.
#
# http://perldoc.perl.org/index-functions.html
#
# Get two DNA sequences from user
print "Please give the first DNA sequence ";
$seq1 = <STDIN>;chomp($seq1);
print "Please give the second DNA sequence ";
$seq2 = <STDIN>;chomp($seq2);

# Create references to the two variables seq1 and seq2
$seq1ref = \$seq1;
$seq2ref = \$seq2;

# Create a scalar which is the concatenation of the two dreferenced references.
$concatenated_str = ${$seq1ref}.${$seq2ref};

# ...and write it out on screen
print("The concatenated string is :   "."$concatenated_str"."\n");
 


